package org.stvd.entities.common;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;
import org.stvd.core.annotation.serializer.DateTimeSerializer;
import org.stvd.entities.base.BaseEntity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

/**
 * @Title AuditDetail
 * @Destribution 审核详情-实体类
 * @author houzx
 * @date 2020年4月1日
 */
@Entity
@Table(name = "audit_detail")
public class AuditDetail extends BaseEntity{

    private static final long serialVersionUID = 2308711124585473876L;

    /**
     * 主键ID
     */
    @Id
    @Column(name = "id", nullable = false)
    private String id = "";
    
    /**
     * 记录ID
     */
    @Column(name = "flow_id", nullable = false)
    private String flowId = "";
    
    /**
     * 审核人ID
     */
    @Column(name = "auditor_id", nullable = false)
    private String auditorId = "";
    
    /**
     * 审核人姓名
     */
    @Column(name = "auditor_name", nullable = false)
    @NotEmpty(message="审核人姓名不能为空")
    private String auditorName = "";
    
    /**
     * 审核状态 参见AuditStatusEnum 审核状态 
     */
    @Column(name = "status", nullable = false)
    @NotEmpty(message="审核状态不能为空")
    private String status = "";
    
    /**
     * 审核意见
     */
    @Column(name = "content")
    private String content = "";
    
    /**
     * 审核时间
     */
    @Column(name = "create_time", nullable = false)
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = DateTimeSerializer.class)
    private Date createTime = null;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getFlowId() {
        return flowId;
    }

    public void setFlowId(String flowId) {
        this.flowId = flowId;
    }

    public String getAuditorId() {
        return auditorId;
    }

    public void setAuditorId(String auditorId) {
        this.auditorId = auditorId;
    }

    public String getAuditorName() {
        return auditorName;
    }

    public void setAuditorName(String auditorName) {
        this.auditorName = auditorName;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    
}
